using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using Bussiness.Entity;

namespace Bussiness.Manager
{
                

    public class PT_HondaModelGroupManager:Bussiness.ManagerBase.PT_HondaModelGroupManagerBase
    {
        public static PT_HondaModelGroupManager CreateInstant()
        {
            return new PT_HondaModelGroupManager();
        }
        public PT_HondaModelGroupEntity GetByGroupCode(int GroupCode)
        {
            List<PT_HondaModelGroupEntity> lst = SelectByGroupCodeLST(GroupCode);
            if (lst != null && lst.Count > 0)
                return lst[0];
            return null;
        }
        public int GetOrderNo()
        {
            string sql = "SELECT COUNT(*) AS OrderNo FROM PT_HondaModelGroup";
            DataTable dt = SqlHelper.ExecuteDataTable(Config.ConnectionConfig.ConnectionString, CommandType.Text, sql);
            if (dt.Rows.Count > 0)
                return int.Parse(dt.Rows[0]["OrderNo"].ToString()) + 1;
            return 0;
        }
    }
}
                    
